home *** CD-ROM | disk | FTP | other *** search
/ Technotools / Technotools (Chestnut CD-ROM)(1993).ISO / lang_c / mikecom / txfree.asm < prev    next >
Assembly Source File  |  1987-05-15  |  875b  |  28 lines

  1.  
  2. title GET FREE SPACE IN TRANSMIT BUFFER
  3. include subfx.h
  4.  
  5. ;  Mike Dumdei,  6 Holly Lane,  Texarkana TX  75503
  6.  
  7. ;****************************************************************************
  8. ; ASYNC_TXFREE -- Returns number bytes left available in the transmit buffer
  9. ;  or R_NOPORT if comm port arg was not valid.
  10. ;****************************************************************************
  11. begseg          COMM_TEXT
  12. publicproc      _async_txfree
  13.         push    bp
  14.         mov     bp,sp
  15.         push    si              ;C stck frame, save regs
  16.         call    __ck_port_arg
  17.         jz      free_exit       ;exit if bad port nbr
  18.         mov     ax,TX_FREE      ;get bytes available
  19. free_exit:
  20.         pop     si
  21.         pop     bp
  22.         ret                     ;restore regs and exit
  23. _async_txfree   endp
  24.  
  25. endseg          COMM_TEXT
  26.         end
  27.  
  28.